<?php $this->breadcrumbs = CMap::mergeArray($model->getBreadcrumbs(true), array(Yii::t('CmsModule.core', 'Update'))) ?>
<div class="common">

    <div class="node-update form">
        <div class="createBox addmarginB20">
            <h4 class="txtfff fnt-size20"><span class="stepCount"><?php echo Yii::t('CmsModule.core', 'Update :name', array(':name' => ucfirst($model->name))) ?></span></h4>
            <div class="padding20px"><div class="formElements">
                    <?php
                    $form = $this->beginWidget('CActiveForm', array(
                        'id' => 'cmsUpdateNodeForm',
                        'htmlOptions' => array('enctype' => 'multipart/form-data')
                    ));
                    ?>

                    <fieldset class="form-node">
                        <div class="col-3">
                            <div class="common">
                                <?php echo $form->label($model, 'name') ?>
                                <div class="clear"></div>
                                <?php echo $form->textField($model, 'name', array('maxlength' => 45, 'class' => 'field oneCol', 'readOnly' => 'readOnly')); ?>
                                <div class="clear"></div>
                                <span class="hint"><?php echo Yii::t('CmsModule.core', 'Node name cannot be changed.') ?></span>
                                <div class="clear"></div>
                            </div>
                            <?php echo $form->hiddenField($model, 'parentId', $model->getParentOptionTree()) ?>
                        </div>
                    </fieldset>

                    <?php
                    $tabs = array();
                    foreach ($translations as $locale => $content) {
                        $language = Yii::app()->cms->languages[$locale];
                        $tab = array(
                            'content' => $this->renderPartial('_form', array(
                                'model' => $content,
                                'form' => $form,
                                'node' => $model,
                                'language' => $language,
                                    ), true),
                        );
                        $tabs[$language] = $tab;
                    }
                    ?>

                    <?php
                    $this->widget('zii.widgets.jui.CJuiTabs', array(
                        'headerTemplate' => '<li><a href="{url}">{title}</a></li>',
                        'tabs' => $tabs,
                    ));
                    ?>




                    <div class="common buttons">
                        <div class="common">
                            <p class="alignL"><?php echo CHtml::submitButton(Yii::t('CmsModule.core', 'Save'), array('class' => 'btn')); ?></p>
                        </div>
                        <br/>
                        <div class="pull-right">
                            <?php
                            // echo CHtml::link(Yii::t('CmsModule.core', 'Delete'), array('delete', 'id' => $model->id), array(
                            // 'class' => 'btn',
                            //'confirm' => Yii::t('CmsModule.core', 'Are you sure you want to delete this node?'),
                            //))
                            ?>
                        </div>
                    </div>

                    <?php $this->endWidget() ?>

                </div></div></div></div></div>